package com.sfj.system.mapper;

import com.sfj.system.dto.task.TaskProblemDescDTO;
import com.sfj.system.entity.TaskProblemEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author kaka
 * @Date 2025/07/02
 */
@Mapper
public interface ProblemMapper {

    // 问题相关操作
    int insertProblem(TaskProblemEntity problem);
    int updateStatus(TaskProblemEntity problem);
    int deleteProblem(Integer problemId);
    int deleteProblemsByTaskId(Integer taskId);
    int batchInsertProblems(@Param("entityList") List<TaskProblemEntity> problems);
    List<TaskProblemEntity> selectProblemsByTaskId(Integer taskId);
    List<TaskProblemDescDTO> selectProblemsDescByTaskId(@Param("taskId") Integer taskId,@Param("userId") Integer userId);
}
